This is a simplified version of [url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=9]Kepler motion[/url] written with EJS.
The question is why I can draw the trajectory when you change the initial condition with you mouse.
(You can drag the red arrow  to change the initial position and magnitude of velocity(vy).
How to determine the trajectory?  Do you know?

Enjoy the fun of Physics! You can access this simulation online from
How to determined the trajectory of a planetary motion?
Designed by Fu-Kwun Hwang (http://www.phy.ntnu.edu.tw/ntnujava/)
Deptartment of Physics, National Taiwan Normal University, Taiwan